package com.modulemanager.page

import com.libservice.ServiceManager
import com.modulemanager.module.ModuleInterface
import com.modulemanager.models.PageConfig
import com.modulemanager.views.PageFragmentContainer

open class FlutterPage(
    module: ModuleInterface,
    type: String,
    id: String?,
    config: PageConfig?,
    params: Map<String, Any>?,
    hash: String?,
) : Page(module, type, id, config ?: PageConfig.Builder().create(), params, hash) {
    override val fragmentContainer: PageFragmentContainer by lazy {
        ServiceManager.instance.flutterService.pageFragment(
            this
        ) as PageFragmentContainer
    }
}